﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace RBAC.Repository.Migrations
{
    /// <inheritdoc />
    public partial class 养殖企业 : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AddColumn<int>(
                name: "BreedEnterpriseId",
                table: "Imgs",
                type: "int",
                nullable: true);

            migrationBuilder.CreateTable(
                name: "BreedEnterprise",
                columns: table => new
                {
                    BreedEnterpriseId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    PlantBreeding = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    BreedName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Quantity = table.Column<int>(type: "int", nullable: false),
                    Batch = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    IsDel = table.Column<bool>(type: "bit", nullable: false),
                    addName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    addDate = table.Column<DateTime>(type: "datetime2", nullable: true),
                    updateName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    updateDate = table.Column<DateTime>(type: "datetime2", nullable: true),
                    delName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    delDate = table.Column<DateTime>(type: "datetime2", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_BreedEnterprise", x => x.BreedEnterpriseId);
                });
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "BreedEnterprise");

            migrationBuilder.DropColumn(
                name: "BreedEnterpriseId",
                table: "Imgs");
        }
    }
}
